compile with gcc. use iterators instead constructing new string