not really important but optimize loop with calculating length once