moved code for tape replay header and summary to separate functions