changed to not require c++11