attempt at new stats function