Refactored to Util file