added custom mico templating function