added console log to find error