using a switch