Published: Dec 28, 2012 11:32 PM EST

WASHINGTON (AP) - After three weeks of gridlock, there appears to be some optimism that lawmakers can reach an agreement to avert across-the-board tax hikes and spending cuts due to go into effect next week.
    
After a meeting today with House and Senate leaders, President Barack Obama said he's optimistic. That same sentiment is shared by Senate's Republican leader, Mitch McConnell.
    
Majority Leader Harry Reid says he'll do everything he can to prevent tax increases and spending cuts but cautioned that any agreement will likely be "imperfect."
    
Under a timetable sketched by congressional aides, any agreement would first go to the Senate for a vote. The House would then be asked to vote, possibly as late as Jan. 2, the final full day before a new Congress takes office.
    
Officials said there was a general understanding that any agreement would block scheduled income tax increases for middle class earners while letting rates rise at upper income levels.
    
In addition, Obama and Democrats want to prevent the expiration of unemployment benefits for about 2 million long-term jobless Americans.