udpates to Query wrapper and engine