parser to deal with different types in a series