working on #49: speeding up the mode switch