moved completion message out of loop