basic query functionality added. some left to go