Changed permutation so that it only stores 256 values