Solved isIncreasing problem