class to struct