Added functionality for step 3