added console.log for debugging