changed function to print lines