one part of the go back  n fsm implemented, not tested