changed struct to class