preliminary work for the decoder state machine implementation