Complex gradient loop

Hi