used std=C++11 flag to compile. Modified comments in main.cpp