made ray and point a separate class