added buttons, improved randomize function