refact pkg/pkgid out