Democrats added a program to give hundreds of thousands of distressed borrowers the opportunity to avoid foreclosure by trading exotic mortgages with rapidly rising monthly payments for more affordable government-backed loans .