implemented wrong ray cast