generators and templates