added a reverseY() function