added aggregation to sum times

runs ~10 - 50x faster depending on size of query