added more graph functions like set_connections