switch class to integer