added console log calls