 Many main and supporting cast members have written episodes of the  show. B.J. Novak (Ryan), Paul Lieberstein (Toby) and Mindy Kaling  (Kelly) wrote 12 of the 28 episodes over the first and second  seasons (albeit separately). One episode so far ("Casino Night", the  second season finale) has been written by Steve Carell (Michael  Scott). One episode (2.8, "Performance Review") was written by Larry  Wilmore, who plays Mr. Brown, the diversity instructor. Michael  Shur, a seasoned writer, plays Dwights cousin, Mose Schrute,  Dwights cousin. Gene Stupinsky and Lee Eisenberg, two writing  partners, play the delivery men in the Valentines Day episode and  others. Greg Daniels, the developer and show runner of the Office,  played Michaels neighbor in "Office Olympics" but his scene was  cut.