a sample text manager example. Didactic code