Have you realized by now that there is no "right" answer?
There was another question, posted nearly 2 years ago Oversimplify it for me: the correct order of investing and your question, while a bit different in how it's asked, can really be addressed with the first snippet of my answer there -
- 401(k) up to matched amount
- High interest debt
- Emergency fund
- 401(k)/Roth 401(k) / IRA/Roth IRA
- Pay off student loans
- Pay off mortgage
I list 6 places your money can go, and I stick to the assertion that if you have the chance to get matched 401(k) deposits, I'd do that as the first priority.
I'll also maintain that an emergency fund should have a high priority. It's important to understand where that $2000 will come from if your car transmission dies. The word for this is liquidity. We can debate the proper level of funding for this account, but depending on your situation, anywhere from 3-9 months expenses can be an appropriate level.
Note, the high rate debt is a priority over this as that money is typically easy to get back. In other words, for those who have only 18% card debt, even $2000 sitting in checking is costing $360/yr in interest. Pay that off, and if the emergency fund isn't ready, charge the emergency expense, and keep working to pay it all off. In your case, the loans can't be accessed again. Pay them all off and when you need to address a urgent expense, you're only choice may be the 18% card.
Given where we are in the economic cycle, I'd reverse 4 and 5, and pay the loans prior to funding the 401(k) beyond the match. Especially for the 4% or higher loans.