updated add_node! and add_edge