changed pointers to structs to structs