converting if to switch