changed node to accept pred and succ