I think it would be better if the bundles could be passed into this function. If we then ever need to move or re-use it, it will become more re-usable.