added tests and functionality for maximum temperature