optimization: change recursive-tail call to loop.
Merge branch 'recursive_tail_call_to_loop' into development