added the print2file loop in method2 - LL