new max temp in state function