properly iterate over lines
extracted apply paragraph and character style methods