cached money array lenght outside of for loop