Add constructor to PackageItem class to reduce repetition