change how @states is provided