added multi-threaded graph initialization