cleanup snippet