switching condition order