The screenwriter and director of the Disney film "Frozen" has encouraged University of New Hampshire graduates to do away with self-doubt.

Jennifer Lee graduated from UNH in 1992. On Saturday, she told the graduates: "When you are free from self-doubt, you fail better. You accept criticism and listen."

Chris Buck, from left, Jennifer Lee and Peter Del Vecho pose in the press room with the award for Best animated feature film of the year for "Frozen" during the Oscars at the Dolby Theatre, in Los Angeles. (Photo by Jordan Strauss/Invision/AP, File)

Lee was the first woman to direct an animated feature film for Walt Disney Animation Studios. This year, she took home an Oscar for best animated feature.

She says "Frozen" wouldn't have been the success it was if her first draft hadn't gone through revisions.

Lee was the keynote speaker at the university's 144th commencement in Durham. More than 2,200 undergraduates and 488 graduate students received degrees