add function: selectorRandom in Helper.java