better mode switching