cleanup enumerate functions