added history parsing