Monte Carlo study of adsorption of a polyelectrolyte onto charged surfaces