v0.4.0 separate and simplify observe with state