try changing your input to a number outside of the range (like 1000, or 0, or -1). See what gets returned. That will set you on the right path.