debts implemented

todo: save the debts