Change belongs to to has and belongs to many