Add johnson algorithm