corrected control flow and push in eastOf function.