add some more logic to the dom elements