makeing a little optimizations on older queries for stats, work in progress