First refactor to fetch json and not string