edges now store node id instead of reference. Making system loosely coupled