debugging raytracing routine part 2 of 2