Added another igetparentandchild utility function.