I completed the solution and got all of the conditions. But I fail to understand why the solution is the correct answer. Can anyone explain what is actually happening in the code?