inlined bisection and remove the submodule