improvements in template