move outside loop