iddfs works but blows the stack and is slow