Fixed code to be in compliance with her description of the code