How to perform switch