Added the max and min methods to object.