position output in loops