Adds queryTable method