I just revert it to testable state, using old algorithm without
optimization. But I found a bug in previous branch, perhaps there is
still hope