refactoring util