refactoring for util class