fix error in main switch method on takin in the new parameter