I have changed the state machine to not use the fifo