refactoring rust class for subclass support.