Update the package function to handle versions