patch now ordered by directories