added 3rd line to loop