added log_ap and pass-gen