It makes no sense to check if a number is less than a maximum threshold

Changed '<' to '>' and cleaned up the code to make it readable.