utility method refactoring