got it into structs that work