Making the code consistent with the example.