changed the rio_t type to be a struct instead of a pointer to a struct