filling the loop