add two more state, and refactor timestate