added log to javascript