Magnetization switching in ferromagnetic microwires