input values and check range of values