Max and Min is working