update to work use pkg.name as the unique identifier