add stat calculations to histogram