added JSON parsing to return object