added an example with pointers