k^3 algorithm
Revert "k^3 algorithm"

This reverts commit 499296fb4a97bd231b2f2c30f7bb026874c3b008.
Revert "Revert "k^3 algorithm""

This reverts commit e3342a57aa383bca9510a69250b3935cf64d26e3.