get all lines at once to prevent issues with marking