Added transition for switching between modes