refactor getallstat + nbbutAVG