first draft of sorting, for better for worse everything now lives in the directive
merging waterfall