add graph and fixed all connections