The U.S. Navy will outfit its latest nuclear-powered attack submarine with hardware from a home video game.

It sounds crazy. But replacing a $38,000 joystick that controls the submarine’s “eyes” with Microsoft’s $30 gaming controller makes more than just financial sense. (President Trump has directed all federal agencies “to protect every last American and every last tax dollar.”)

The idea to use the Xbox came from the Navy sailors themselves, many of whom grew up playing video games. They are used to the Xbox controller and can pick up in minutes how to use the digital periscope system. “If we have a good idea, we bring it in here and try it out. It may work, it may not,” said Jacob Shultz of Lockheed Martin, which formally tested the Xbox controller–based interface in a model-sub control room.

Specifically, the video game part will direct the submarine’s advanced digital periscopes (called “photonics masts”), which look out on the horizon.

Tech sharing between the military and the private sector goes both ways. Military satellites provide free access to signals from the Global Positioning System, a network of satellites that sends details to Earth. Smartphones and automated teller machines rely on the system. Extra-sticky duct tape is another invention developed for the military that is now widely used by consumers.

The Xbox controller has already sailed on the Navy’s USS John Warner submarine and is expected to be fitted into all nuclear-powered attack submarines, called Virginia-class submarines.