computing and saving graphFile
removed superfluous func declarations