compatibility on all OS for hamming matrix