added new methods for dealing with attributes in the template model