Reduce duplication of stats logic