better checks for state