max and min values for input added