const int pattern000 = 0;
const int pattern001 = 1;
const int pattern010 = 2;
const int pattern011 = 3;
const int pattern100 = 4;
const int pattern101 = 5;
const int pattern110 = 6;
const int pattern111 = 7;
