use Classy Lens instead of fixed state monad. Enhanced generality.