corrected module for vhdl