adding loop for iteration