Added code for step 2.