replace std::list with std::vector and std::deque