split HTML
refactor