added setparent method