Preliminary function to convert temperature