replaced id usage in Node and Edge by hashCode