how to use pointers as arguments in a function