implement switch_* method and works pretty well