Add basic query functionality