Formation of Galaxies inside clusters