add more query index tests
fix a couple of bugs on ie
make the sample a little bit more sophisicated