update tree takes place after each move