some piece of refactoring