Problem #5

some edits