Renamed and added randomize method

Main changed to test randomize method