Updated keerthikan's code to c++11 std