refactoring about Attribute types