changed states to model