replacing pointers