did the same sort of thing using typedef to define a new data type