twoPackages function