added sample for closure by value