refactor some unuse fn
refactoring