fix if statement

better if statement