Creating a stackedSeries function.