update linking table when adding new class