making sure pointers point at the right thing