Finished updateStat rewrite