Change to switch logic