Title: Finite state control in functional neuromuscular stimulation