Utilization of the PCM latent heat for energy savings in buildings