Made PileP a generic type