refactoring debit_row and credit_row