adding tract query functionality