starting work on ordered edge-swapping, not working yet