fixed #3: added restoring groups