added randomizer, fixed javadoc