updates to query builder and angular controller