updated template to make it work