manual looping