stacked sorting and nesting works wonderful now