let's make origin and direction references to better communicate output paramters