first version of CH1:03. Solution developed on paper. Problems with iterators