adds getAttr function to Char to find attribute in Char.attributes