micro quasi monad based state emachine