add_debt function