pushed the chagnes to make code compile with c++11