Rewrote Foo function to use the collection properly