added randomize method