wip on reordering optimization