why don't you use a `for` instead of repeatedly counting the output?