graph traversal works! except from one issue with the previous node attribute: should actually be an array...