updated
ivan's implementation of the lesson