debts insert function and form