the JS code for the temps and mode works now