implementation of 2d point
implementation of 3d point