reworked getValidHighestY() method