added the querying for the domain

added domain querying and collection