Monte Carlo and mean field studies of a polyelectrolyte in salt solution