Refactored adding a line