Add code for randomising iterations of mds
Add code for randomising iterations of mds