Added getPackages function for adding packages