graph creation using files