replace i with delta loop in stage 1