refactor subclass flag