code frome lesson 6