Added randseed initialization