ADDED some changes for C++11 support