need to pick random index and not generate output to stdout