new generic template
move attributes extension inside class