Adding checkForMonotonic