optimized with ienumerators