added query capability.