investigating the c++11 features and removing archaic use of manually defining iterator variables! what a drag!