begin handling directories