Can you please explain the logic?