fetch json setup imporved to return content type json simplifying the solution