Improved series.js