got query building and query registration to work; work on result distribution later