simulation working. To be mapped to FPGA now