statistics rewrite