refactor some class