gras: moved query app to top level