playing with for_each and functors