if and switch