Implemented part B of step 3