changed typdef struct to regular structs