MIDSTATE MACHINE