I have earlier presented a framework for hadronic rescattering Pythia in the context of pp collisions. In this talk, I will present the results from our recent paper where we have studied rescattering in pPb and PbPb collisions, using the Angantyr framework to generate heavy ion collisions. This will give a detailed view on how rescattering affects charged multiplicity and transverse momentum distributions, and where rescattering occurs in spacetime. We will see that rescattering gives rise to a significant $v_2$ flow coefficient, which describes PbPb data surprisingly well at high multiplicities. There is also a possible indication of jet quenching due to rescattering.