methods to check for increasing and decreasing numbers