removed range-based loops again as they seem not to be supported by msvs2010