from double to float, add Ray