update format of Gray Code