結果 : state variable approach