Change if to switch