implemented reordering and laph2 support