manage state sample