copied in template