refactored states verification