factored out chooseRandom on the client, using _.sample instead