added min and max methods