use Query factory