added log statements