example of passing pointers to functions