removed dependency on Query api. fixes #1