working cga for ordering and mapping