generated the rays