updated to C++ iter. for list