almost complete addRelation