stats functionality working