refactored states -> attributes