lines refactor