extendpi instead of naively appending all i X i