Added max
Implemented min