changing structure to AMD-friendly