Change get_temperature function to be const