added edit / command mode toggle