CHICAGO (CBS) — For the first time ever, doctors have developed an artificial leg that is controlled by the person’s thoughts.

And it happened here at the Rehabilitation Institute Of Chicago (RIC).

“So I move my leg out, push the toes down and bring my toes back up,” said Zac Vawter, the first man in the nation to have a so-called bionic leg.

He is able to make these movements just like people with a fully functioning leg do: With his thoughts.

In 2009, Vawter lost his right leg from above the knee down in a motorcycle accident. His bionic leg allows him to bend his knee and move his ankle.

“It’s exciting,” he said. “It’s neat. It’s intuitive. It puts energy into me walking and moving around.”

With a regular prosthetic leg, movement like this isn’t possible.

So how does this all work?

Two nerves in Vawter’s leg were rewired to his hamstring muscle.

Those nerves communicate with the sensors inside the prosthetic leg socket. The sensors send a message to a computer.

“So when he thinks about straightening or bending his knee, this computer can detect that and tell the knee to bend or to straighten,” Dr. Annie Simon, Biomedical Engineer at the RIC.

A team, headed by Dr. Levi Hargrove, spent four years perfecting the technology Vawter is using.

“He’s giving back so much,” Hargrove said. “He’s taken a less than ideal situation and made the most of it and he’s helping potentially, millions of people.”

Vawter, a software engineer, knew about RIC’s bionic research.

He never thought one day, that technology would be used to help him walk.

“RIC is really pushing the boundaries of what’s possible with prosthetics and it’s exciting to contribute to that and to help them push forward into new areas of research,” Vawter said.

RIC research is funded through an $8 million grant from the U.S. Army with a goal of creating better prosthetic limbs.

More than 1,200 soldiers have had lower limb amputations from the conflicts in Iraq and Afghanistan.