addition check to see if parentNode exists