reverting to switch statement