fixed the labeling of gray code inverse