generator fragments and templates