updated to use dom object
version!