canged to for loop using count()