modification in test_rays