refactor some thing