need to check that variacble is class before checking subclass
checked for isclass