changes for json api
fixed tests for json api