saving changes.
Corrected the first part of Johnnson' algorithm.