Refactored the fetch util