split states into files