Added ability to modify max and min values