refactored Util methods