second if statement added