implemented save state for addons