refactor HtmlDom