changed initialisation of the rnd engine and used mt19937