Renamed field "state" to "ray" because that's what it is