refactor class.