add _switchKey method  and switchKey to prototype