apply if statement to header