Updated code, randomize() functional