Adding state graph