refactoring and add lecture