improved build;wired up query;displaying graph;bugfixes