handling multi command queries