update the current node pointer to the correct next right subtree
p = rightpointer;