finished ptt parser