make query data independent