try tail recursion, per https://gist.github.com/mvidaurre/11006570
experiment with tail recursion and randomization