add Attr class
move to tpl for template