update code to using McroTpl