state implementation