public void removeActivity(Activity a) {
        if (user.getActivities().contains(a.getId())) {
            //user will actually be changed
            user.removeActivity(a.getId());
            //we got rid of it, so don't keep it around
            activities.remove(activityIdNameMap.get(a.getId()));
            activityIdNameMap.remove(a.getId());

            activityNames = activities.keySet().toArray(new String[0]);
            //cleanup
            //remove from schedule
            if (schedule != null) {
                schedule.removeActivity(a.getId());
                MongoHelper.save(schedule, MongoHelper.SCHEDULE_COLLECTION);
            }
            //get the group and clean
            if (groups != null && groupIdNameMap != null) {
                Group f = groups.get(groupIdNameMap.get(a.getGroup()));
                if (f != null) {
                    f.removeActivity(a.getId());
                    MongoHelper.save(f, MongoHelper.GROUP_COLLECTION);
                }
            }

            //make changes to db
            MongoHelper.save(user, MongoHelper.USER_COLLECTION);
            MongoHelper.delete(a, MongoHelper.ACTIVITY_COLLECTION);
        }
    }