switched from push_back to emplace for valgrind