added the ability to read a trace from stdin