group dir first