Resolved: ahaaaaaaaaaaa please stop using similar names like shuffled and shuffle it's getting confusing
its getting hard to understand since building function in R2.0 and scoping because the objects names are similar to functions that it started to become confusing try using different names with the same meaning.
thanks for reaching out and sorry for the confusion. Unfortunately, the choice of variable names in the course is up to the author and we cannot change in retrospect. You're welcome to use alternative names in your code and whilst following the course lessons.