Integrating old code to new teach method