updated query format