remove useless method and refactoring