refactoring during a training class.