save ids on collection creation and removal