adding example for memory wrapper