Modified helper function to make it accept an array of asset names.