M15 and distant galaxies