I would move this method into the Util class.