removes duplication from parser and its spec