switching path and state