Adding a switch to the formula