refactoring the lesson template