updating queries