writing Point class