resolving header and line breaks