raycasting is working a lot better now