need to reformat so it works with structs