Getting some graph walking logic in