slight update so that you input the total number of lines that are printed