changed dir,

updated query builder to function asyncronously