added ability to set minimum value