the answer is that we have to pass all of the data into transition function except for the previous state.