changed pop_back() to c++98 functions