updated calculation of 'final_hamming'. Stupid VHDL array syntax.