Monte Carlo simulation of ferroelectric polarization switching