restrict the input to a number between 0 and 255