converting class to struct