this is required for the hamming benchmark (or it can probably be rewritten)
this is required for the hamming benchmark (or it can probably be rewritten)