switch contains method