add option to define custom template