move to switch statement