stable; just need to deal with cases where stack depth gets deep
memory efficient but not fast enough for test