Greg Davies has said he used many of his own real-life experiences in writing his new sitcom Man Down.
The Inbetweeners actor has written and stars in a show about a man who doesn't want to grow up and hates his job as a teacher.
Greg, who used to be a teacher himself, said the inspiration for many of the jokes had come from his old job and members of his family.
He said: "It was strange being back in the classroom and the reason it was strange is because the classroom that we filmed in was my real classroom when I was a teacher... it was a bit like therapy."
Greg also managed to sign up Rik Mayall to play his dad in the show which he was thrilled about.
He said: "My dad is the funniest person I've ever met and it was important to me that the person who played him was naturally funny. To get Rik Mayall was just a fantasy, it was a joke.
"I asked him but I never for a second thought he would, I just thought it was pie in the sky, but then he came and met me and he said yes and it was brilliant. He is one of my comedy heroes."
The Cuckoo star said that although he had taken some scenes from family memories, most of the family were too exaggerated to be based on his own.
But on his own character Dan, he said: "The fact that Dan doesn't really want to be a teacher and isn't organised and just wings it all the time I think comes from a very real place because I was the most disorganised teacher, it was one of those strange things in life - sometimes life just drags you along, so I was a teacher for years and I never intended to be.
"I think the same thing is true of him, he's just freewheeling and getting through his teaching career and it's almost by accident that the kids like him."
Man Down airs this autumn on Channel 4.