start of parsing tpi header