added a js controller that can dynamically generate javascript