added gray codes