19.3 my semi-incorrect solution