fix add_edge, add write community