Not long after I Spy ended, Cosby starred in his own sitcom. The Bill Cosby Show ran for two seasons, from 1969 to 1971, and featured the comedian as a gym teacher at a Los Angeles high school. A former aspiring teacher, Cosby went back to school at the University of Massachusetts at Amherst. Around the same time, he appeared on the educational children's series The Electric Company, and developed the animated series Fat Albert and the Cosby Kids, which he based on many of his childhood experiences. In 1977, Cosby received a doctorate in urban education from the university, having written his dissertation on Fat Albert.