"Enlisted" Creator Kevin Biegel and Executive Producer Mike Royce decided in 2012 to create a TV workplace comedy about the military.
The odds were not in their favor.
Prime-time television, once home to madcap military adventures like Sgt. Bilko on "The Phil Silvers Show," "Gomer Pyle, USMC," "Hogan's Heroes" and "MASH," hadn't supported a military comedy in years.
"It's basically a workplace that is very important to America and has disappeared from television," said Royce.
That might have been in part because the U.S. had been at war for over a decade. Maybe the Army just wasn't funny anymore.
"It was kind of sacred ground," Biegel said. "People were like, 'Maybe you shouldn't do that.' But for us it was the opposite. We thought, 'Of course we should.'"
The duo made their sale on the first pitch, to Fox executives who embraced the concept heartily.
"Why isn't this show on the air right now?" Jonathan Davis, president of creative affairs at 20th Century Fox, remembers asking himself. "Why isn't anyone doing this yet?"
The resulting Friday night show, "Enlisted," premiered in January. The ensemble comedy follows a serviceman who is demoted after socking a superior officer and reassigned to lead a group of Army misfits.
Prior to "Enlisted," Biegel co-created "Cougar Town" and wrote for "Scrubs." Royce was a producer for "Everybody Loves Raymond" and "Men of a Certain Age."
The goal with "Enlisted" was "to show, just like any good workplace comedy, how these people grow and bond and how they live their lives every day in this workplace," Royce said.
Trouble was, though Biegel grew up with two brothers and a father in the armed forces, neither he nor Royce had served in the military.
As a result, the pilot was sprinkled with inaccuracies. The soldiers' hair was too long. Their uniforms were not to code. They didn't salute senior officers when they should.
Leery of producing a show that was disrespectful — "We're not trying to poke fun at the institution," Biegel said — the "Enlisted" men reached out for help.
After the pilot was shot, they hired Greg Bishop, an advisor at Musa Military Entertainment Consulting, who viewed the show and found it … lacking.
"There were a lot of things wrong with the pilot, not done out of disrespect, but done out of not knowing," Bishop said. "We said, 'Wow! They could use our help.'"
Bishop worked with the creators to make the show more authentic and also helped with publicity by reaching out to military members.
Changes to the show included perfecting the uniform (such as putting badges in the right place, and making sure actors wore their hats inside and outside) and helping with set details (including adding stock numbers on grease barrels that appear in the background).
It even meant putting some cast members through several days of a "mini boot camp" in El Paso.
The actors stayed in barracks, wore uniforms, did basic training, and underwent surprise checks for "contraband" such as books, cellphones, laptops and candy. Some of the cast members were even shunned for not flushing their toilets.
The improvements in accuracy didn't make for a hit. The first of the season's 13 episodes averaged just 2.4 million viewers and got a weak rating of 0.7 in the advertiser-desired 18-to-49 demographic.
Military members and their families who were not pleased with the inaccuracies took to social media to complain.
A Facebook page, "Petition to Cancel TV Show Enlisted," reads: "This tv show is an insult to say the least to all military personnel. It satirizes our way of life and has no place on Fox or any other tv channel."
Biegel and Royce said Twitter was also full of people bashing the pilot.
So they took to social media to turn the show around.
"I probably contacted at least 200 military people on Twitter over direct message," Biegel said. "I would say, 'Hey, my name is Kevin. I created the show. Please give it another chance.'"
"It was a matter of going through every medium — blogs, podcasts, websites — to get in there and explain where we're coming from," Royce added.
After several episodes, the creators said their outreach effort and changes to fix the show have helped.
Fox officials said the show now has an average of 3.1 million viewers and a rating of 1.2 in the 18-to-49 demographic.
The show's Facebook page has just over 60,000 "likes," and the Twitter account has almost 7,000 followers.
People have used those social media sites to comment on the show's progress and suggest further changes.
"Really glad the show's getting better as we go along," one Facebook fan commented, but then criticized the show for featuring female soldiers wearing earrings.
The "Enlisted" Facebook page replied: "Good eye, soldier! We appreciate it!"
Though Fox has not announced whether the show will be renewed, those involved remain hopeful.
"We really believe in this show and think it deserves a second season," Davis said.
[Updated, 2:04 p.m. March 26: An earlier version of this article omitted the complete titles for Kevin Biegel and Mike Royce.]
When: 9 p.m. Friday
Rating: TV-14-DL (may be unsuitable for children under the age of 14 with advisories for suggestive dialogue and coarse language)