synchronizing on state object