Rewrite StatUtils