added log stuff