add example for closure creation