question 0. implemented registerinitialstate and getaction.