basic closure example for variable scope