added the missing self
adding set default attribute template
ad the implementation of setting an attribute