using signals to update the graph to avoid segfaults