change express res.json to undeprecated call