testing for swtch