update populating next right pointers