auto attach p2.index