add graph constructor for reading file