Added stateful example.