refactoring sixth-exercise's examples