how to create a custom template