updating stat query