implementation of lesson 3