Updated looop procedure.