adjacency list representation of Figure 5.7
better comments
implementation of Figure 5.8
removed inadvertant output, move tolerance to class constant