add condition to switch machine