4 directions; TODO important: instead of compare tipZ and endZ, should compare that in tabletop coordinate