returning json from browser calls