switch to detect the in class