version using dat for static data and watched variable and d3 for static
data