cleaning stats procedure