Modify the code as recommended