add cleaning function