changing len to count()