new 3-walls algorithm works!