Adding query capability