added code to request JSON objects