Started to implement switching ML
Fixed index error in turbulent SA function