simplify state example