refactor to use index & delete submodule