cleaning/use if statements in dialog interface