Upgrading the Wiener index