make stats script more accurate