added sample for closure by reference