Full version of foci log algorithm with settings