fixed the join table and created a memberships table