imporved json fetching, added possibility to fetch from server