implemented point class