updating stat functions