While the recently launched Autopilot has some glitches, Tesla CEO Elon Musk is optimistic about autonomous technology.

During an exclusive interview with Fortune, Musk said that while it might have an autonomous car reade by the end of 2017, it could take another 12 months for regulators to approve the use of such vehicles on public roads. In some jurisdictions, he added, the approval process could take over five years.

“We’re going to end up with complete autonomy and I think we will have it in approximately two years. I think we have all the pieces, and it’s just about refining those pieces, putting them in place and making sure they work across a huge number of environments—and then we’re done.”

Musk made the proclamation while hitting out at mobile phone hacker George Hotz who recently revealed his very own autonomous car amidst criticisms of the “Mobileye” autonomous technology being used by Tesla.

The outspoken CEO says that Hotz’s product is well behind that of Tesla’s and doesn’t have the capability of being expanded for use around the world.

“George says he did this with 2,000 lines of code. OK, listen buddy, uh, 2,000 lines of code does not cover the 8 billion corner cases of earth. The world is a complicated and messy place. Two thousand lines of code ain’t gonna cover it,” Musk said.

PHOTO GALLERY