split directory operations and add a door to leave directory