Added new max and min methods to matrix