for large graph