stats functionality added