Refactor for line