changed east to right and west to left. removed and added comments