emergency fix

add delete function, fix the exception when adding new item, index
expansion problem for checking the family relationship.