wrote affliation model + fixed some membership stuff