refactor native class