addressing control flow in eastOf and westOf functions.