node class now has arraylist of linked nodes, edge class has mass and value