added log events (wip), minor modifications