set up query and url hashing and goto urls