Stat core rewritten