added functions for temperature and humidity calcutation