3a finished? 3b started
3a is_leaf
 3b still trying recursive now moving to iterative with array
before converting all functions to const