Excellent little exercise for abstraction and modularization