refactored commo lines