make some adaptations for state