changed std::list to std::vector