Head First Design Patterns: credit for code to Mark McFadden