Added the code for step 2