changed the place where data is randomized
modularized gaussian mixture code