simplifying the DOM handling