changed r.json() to r.json, was receiving dictionary error