changing the less than greater than size, to return correct answer