convert to one layer struct