Implemented Mode switch.