now writing line items to the db rows