if then else works