ported rand_word to spice2