refactor teach code directory