add some atrocious code to get to json-api