convert attrs to awestruct format