implement load graph from file