switch class to struct