implement template library in controller control