Adding query interface