fixed if else statements