things are kind of out of order, but I implemented LineRay type, checked it, and implemented all combinations of intersections; this should make life easier