added log in gen alg