changed NewNode func to take a logger instead of creating one automatically