preliminary ray cast stuff