change makes code more c++11 idiomatic.