called the teach method on instructor and learn on student