more robust stats recording in preparation for stats