POCATELLO (AP) — After watching several friends become afflicted by illness after their retirements, Idaho State Police Capt. Ed Gygli decided he needed a new job when he left the force this year.

Now, the 52-year-old ISP veteran is a rookie brakeman for the Union Pacific Railroad, learning a trade that will require constant attention to prevent some of the fearsome accidents he encountered on the force: car-train collisions.

Gygli said the first fatal car accident he investigated as a lawman came when a locomotive plowed through a motor home.

Historically, brakemen on trains would ride on top of the railcars and turn iron wheels to engage primitive brakes attached to a long metal rod.

These days, a train brakeman like Gygli helps the conductor by throwing switches and joining train cars together in a fashion that protects crews on freight trains — and the public.

"Those trains, you have to have a lot of respect for them, and you have to have your head in the game all the time," Gygli told the Idaho State Journal. "It's kind of refreshing actually. I work with a lot of young people, and they keep me young."

Gygli spent more than 30 years in law enforcement, starting his career as an officer on the Shelley, Idaho, force the day the Teton Dam burst in June 1976. It killed 11 people and 18,000 livestock as millions of gallons of water swamped much of eastern Idaho.

Now, he's working in the local switchyard in Pocatello, which got its start in the 1880s after the Union Pacific acquired the Utah and Northern Railway and extended it into Idaho Territory.

With fuel prices at more than $4 per gallon, Gygli expects he'll have a solid future at the railroad in southeastern Idaho, shipping high-tech computer chips from local semiconductor makers as well as regional mainstays,

including agricultural products like the potatoes for which Idaho is famous.

"I think it's very important to this nation to have a railroad that ships freight very efficiently," he said. "I'm proud to be a member of UP now."