handle @type better in p4 to p5