Replaced switch statement with parameter, what was I thinking