if statement and switch