added console.log for troubleshooting