Added getMax and getMin methods