skeleton of toggling