extracted euristic algorithm and depth