corrects #66 but the js template for default output will need adjustment