Adding query library