optimized I loop
cleanup