deleted former MST algorithm code