Implement the fetch handler