Added switch cases in the advanceHelper method.