refactor update lines