improved dirs stack