first attempt at retrieving json works but is ugly.