find function with pointers