added console.log(resource)