another speed improve

for() with caching