First commit. Iterative version complete. Recursive version still to do.