Added grayCode