Refactor series generation method