fixed if statements to display correctly