If and alerts added for second question and comments for each.