Added some C++11 syntax to make it more readble