for consistency, have nodes start at 0
added Graph datatype, with function to create it from edges