setting custom stats every end window