Added further functions to deal with parent-child