storage has changed to a std::map as this is more flexible