swtiched control statement in commands