Molecular graphs and the inverse Wiener index problem