getting query decoding working