ray traversal initaly working