Naive root replace diff implementation