refactor paragraph compound