Returning instead of print inside the fetch function