Code duplicated. You can add $comment to $result after conditions