reimplements is_subclass_of function