work with mulitple types queries