perfecting the template