working cga for mapping and ordering