local state
caching
use refs for distributing state