fixed random generation, finished transition to AVX