The last phase in the formation of the terrestrial planets in the Solar System presumably determined the water content of Earth. This so called late stage accretion is dominated by gravitational interactions between protoplanetary embryos and planetesimals in the interior of the planetary system, inside Jupiter’s orbit. N-body simulations of this last phase are the method of choice to understand and model the formation of the final planets. I will discuss how collisions between these gravitating objects can be modelled in the context of long term N-body simulations and what we can learn from these simulations about the transfer of volatiles, especially ice. This will allow to investigate the origin of Earth’s water in the conditions of terrestrial planet formation.