almost done with state. TODO(chenclee): finish scoreboard