lesson3 with corrections