add function to template-market