adding the dom element to the constructor