add proper relation nodes with some sketchy code
handle some delete cases with some sketchy code