added isOnRight isOnLeft