refactor teaching