updated to print all lines