fix if else statements