remove for loop length cache