was not parsing the html correctly