remove switch statement