basic framework for a switch started