Add stat recreation code