fixed getting all rays, added tests for raytracing