Use std::pair instead of defining a struct