loop for power iterations