replaced graphInit function with immediately invoked function on mind-map