adapted the template