Infall of galaxies onto groups