code for demo of function returning the pointer