add global handle to allow cross domain access, and re-format json
output