Modified to template