Wyoming is one of the best states to drive in, according to a new study. The Cowboy State ranked eighth among the safest, most affordable, and least crowded roads in the country.

The study compared several factors, including commute times, gas prices, insurance premiums, car thefts, and accident mortality rates around the country. Wyoming scored high marks for overall safety, cost, and driving quality, finishing behind North Dakota, Iowa, Ohio, Minnesota, Nebraska, Indiana, and Kansas. Nine of the top ten states in the study were in the Midwest.

California ranked last in the study. Hawaii, Connecticut, New Jersey, and Washington rounded out the bottom five while Colorado was ranked the seventh-worst state for driving.

Although Wyoming may be one the best places to drive, Cowboy State commuters still encounter hazards. Earlier this year, another study ranked Wyoming drivers as the fastest in the country. with an average speed over three miles per hour higher than the closest state. Wyoming also has one of the highest percentages of fatal car accidents nationwide.