Completed exercise 1 of Addy Osmani book