refactored Utilities code