changing order of param swapping for setTemperature