save and record stats