adding change_parent method to tree container