adding parent method for dom