← → to move
building state graph