using structs by reference