If the value given by user is smaller than the default value, the function will use the default value instead.