properly split lines so that I cut out the right divs