switch class var