refactor line items model