partial ukkonens algorithm, still buggy