ensure that a curve is 26-connected
minor changes
condition simplification
indents,