basic util refactoring
basic util refactoring