implemented the exchange mutation operator