changing directory index