public void setGroup(Integer GroupId) {

        Group old_f = null;
        Group new_f = null;

        //need to update active group to not include this entry
        if (activeGroupId != null) {
            old_f = (Group) MongoHelper.fetch(new Group(activeGroupId),
                    MongoHelper.GROUP_COLLECTION);
            //no db copy, so nothing to do really
            if (old_f == null) {
                System.out.println("Old group " + activeGroupId + " not "
                        + "found. Could not unregister activity with db copy "
                        + "of group");
            } else {
                old_f.removeActivity(id);
            }
        }

        //need to update the new group to include this activity
        if (GroupId != null) {
            //add the activity to the group's activity list
            new_f = (Group) MongoHelper.fetch(new Group(GroupId),
                    MongoHelper.GROUP_COLLECTION);
            if (new_f == null) {
                System.out.println("New group " + GroupId + " not found. ");
                //no need to do anything further, changes not written to db yet
                //so returning will just drop the changes
            } else {
                new_f.addActivity(id);
            }
        }

        //write the updated group back to the db
        if (old_f != null) {
            MongoHelper.save(old_f, MongoHelper.GROUP_COLLECTION);
        }

        if (new_f != null) {
            MongoHelper.save(new_f, MongoHelper.GROUP_COLLECTION);
        }

        //perform the update
        this.activeGroupId = GroupId;

        super.updateDate = new Date();
    }