First working version of new statistic