minor changes for large graph