add state synchronuously
Merge pull request #16 from mloy/add_sync

add state synchronuously