restore checkAssociation.m