re-factored animatable and director example to use register