added a new debug function for series