Enhanced raycasting that now meets assignment specs