moved len call out of timing