Magnetization reversal in nanoparticles